﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<#include "/pages/include/include.ftl" />
<@h.css href="/css/uc.css"/>
<@h.css href="/css/upload.css"/>
<@h.js src="/javascripts/public/myfile.js"/>
<#include "/pages/include/setlayout.ftl" />
<script type="text/javascript">
	var myfile=new myfile();
	$(function(){
			$('#choose').click(function(){
				myfile.chooseCate();
			});
	});
	function submit(){
		myfile.editFile();
	}
	
</script>
</head>

<body>
<#if Parameters.from?exists>
<#assign menuId="adminfile">
<#else>
<#assign menuId="myfile">
</#if>

<div id="layout1" class="wrapper">
	<#include "/pages/person/myfile/file_menu.ftl" />
	<div position="center" title="编辑文档">
		<form id="saveform" action="${contextPath}/myfile/myfile-save.action" method="post">
		<@s.hidden name="file.id" value="${file.id?if_exists}"/>
		<@s.hidden id="referrer" value="${referrer?if_exists}"/>
		<div id="step2" class="multi-upload">
			<div id="all-fill">
				<table cellpadding="0" cellspacing="0" class="l-table-edit">
		            <tr>
		                <td align="right" class="l-table-edit-th">标题:</td>
		                <td align="left" class="l-table-edit-td" >
		                	<input type="text" class="inputText required cnendigit" value="${file.fileName?if_exists}" id="filename" name="file.fileName" maxlength="50" ltype="text" style="width:595px;" />
		                </td>
		            </tr>
		            <tr>
		                <td align="right" class="l-table-edit-th" valign="top">分类:</td>
		                <td align="left" class="l-table-edit-td">
		                	<span id="cateinput" style="margin-right:30px;">${file.category?if_exists}</span>
		                    <@s.hidden id="cateinputHidden" name="file.category"  value="${file.category?if_exists}"/>
		                    <@s.hidden id="cateIdHidden" name="file.categoryId" value="${file.categoryId?if_exists}"/>
							<a id="choose" class="minibutton" style="width:70px;"><span>修改分类</span></a>
						</td>
		            </tr>   
		            <tr>
		                <td align="right" class="l-table-edit-th" valign="top">介绍:</td>
		                <td align="left" class="l-table-edit-td">
		                    <textarea id="all-summary" name="file.desc" maxlength="1000" cols="100" rows="10" class="l-textarea" style="width:600px">${file.desc?if_exists}</textarea>
		                </td>      
		            </tr>  
		 			<tr>
		                <td align="right" class="l-table-edit-th">关键词:</td>
		                <td align="left" class="l-table-edit-td">
		                	<input type="text" class="inputText" value="${file.keyword?if_exists}" id="all-keyword" name="file.keyword" maxlength="100" ltype="text" style="width:595px;"/>
		                </td>
		            </tr>
		            <tr>
		                <td align="right" class="l-table-edit-th"></td>
		                <td align="left" class="l-table-edit-td">
		                	是否可下载:<input class="inputCheckbox" type="checkbox" name="file.canDownStr" <#if file.canDown> checked="checked"</#if> />
		                	是否可评论:<input class="inputCheckbox" type="checkbox" name="file.canFaqStr" <#if file.canFaq> checked="checked"</#if> />
		                </td>
		            </tr>
		        </table>
			</div>
			<div style="width:656px;" align="center">
					<a href="javascript:submit();" class="minibutton"><span>提交</span></a>
			</div>
		</div>
		</form>
		
	</div>
	<#include "/pages/include/top.ftl" />
	
	
	<#include "/pages/include/bottom.ftl" />
</div>

</body>

</html>
